<?php
/**
 * Created by PhpStorm.
 * User: liyalong
 * Date: 2018/8/13
 * Time: 下午12:15
 */

namespace Modules\News;


use Houdunwang\WeChat\WeChat;
use Modules\News\Entities\NewsReply;

class Respons
{
    public function handle($data){
        $instance = WeChat::instance('message');
        //通过对应规则数据找到news_reply表中的回复数据
        $news = json_decode(NewsReply::where('rule_id',$data['id'])->first()->data,true);

        return $instance->news($news);
    }
}